package com.example.springlog.enums;

/**
 * @Description:
 * @Author: 刘超
 * @Date: 2023-06-01 16:16
 */
public enum SensitivePatternEnum {
    idcard("(\\d{18}$)|(\\d{17}(\\d|X|x))","6,14"),
    phone("(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}","3,7"),
    email("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*","@<(3,7)"),
    ;

    private String regex;

    private String rule;

    SensitivePatternEnum(String regex, String rule) {
        this.regex = regex;
        this.rule = rule;
    }

    public String getRegex() {
        return regex;
    }

    public void setRegex(String regex) {
        this.regex = regex;
    }

    public String getRule() {
        return rule;
    }

    public void setRule(String rule) {
        this.rule = rule;
    }
}
